<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>

    <script src="../lib/vue2.js"></script>
  </head>
  <body>
    <div id="box">
    <!--v-show仅决定显示，节点一直存在，v-if直接未创建节点 -->
      <div v-show="flag1">one</div>
      <div v-if="flag2">two</div>
    </div>

    <script>
      let item = new Vue({
        el: "#box",
        data: {
          flag1: false,
          flag2: false,
        },
      });
    </script>
  </body>
</html>
